package com.motu.vertx.module.utility.monitor;

public class LoginMonitorManager {
    private static int packageNum = 0;//数据包数量

    private static int loginPackageNum = 0;//登录协议数据包数量
    private static int loginResponseDataSize = 0;//登录协议下行包大小
    private static long loginDealTime = 0;//登录协议响应时间（毫秒）

    private static int createRolePackageNum = 0;//创角协议数据包数量
    private static int createRoleResponseDataSize = 0;//创角协议下行包大小
    private static long createRoleDealTime = 0;//创角协议响应时间（毫秒）

    public static void resetAll(){
        packageNum = 0;//数据包数量
        loginPackageNum = 0;//登录协议数据包数量
        loginResponseDataSize = 0;//登录协议下行包大小
        loginDealTime = 0;//登录协议响应时间（毫秒）

        createRolePackageNum = 0;//创角协议数据包数量
        createRoleResponseDataSize = 0;//创角协议下行包大小
        createRoleDealTime = 0;//创角协议响应时间（毫秒）
    }
    public static void addPackageNum(){
        packageNum ++;
    }
    public static void addLoginData(int resDataSize,long dTime){
        loginPackageNum ++;
        loginResponseDataSize += resDataSize;
        loginDealTime += dTime;
    }
    public static void addCreateRoleData(int resDataSize,long dTime){
        createRolePackageNum ++;
        createRoleResponseDataSize += resDataSize;
        createRoleDealTime += dTime;
    }

    public static int getPackageNum() {
        return packageNum;
    }

    public static int getLoginPackageNum() {
        return loginPackageNum;
    }

    public static int getLoginResponseDataSize() {
        return loginResponseDataSize;
    }

    public static long getLoginDealTime() {
        return loginDealTime;
    }

    public static int getCreateRolePackageNum() {
        return createRolePackageNum;
    }

    public static int getCreateRoleResponseDataSize() {
        return createRoleResponseDataSize;
    }

    public static long getCreateRoleDealTime() {
        return createRoleDealTime;
    }
}
